home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 26.zip / BS1 part 26 / Aztec C v5.2a disk 4.adf / 204inc_h.lzh / intuition / preferences.h < prev    next >
C/C++ Source or Header  |  1991-03-14  |  9KB  |  269 lines

  1. #ifndef INTUITION_PREFERENCES_H
  2. #define INTUITION_PREFERENCES_H TRUE
  3. /*
  4. **  $Filename: intuition/preferences.h $
  5. **  $Release: 2.04 $
  6. **  $Revision: 36.6 $
  7. **  $Date: 91/02/01 $
  8. **
  9. **  Structure definition for old-style preferences
  10. **
  11. **  (C) Copyright 1985,1986,1987,1988,1989,1990 Commodore-Amiga, Inc.
  12. **        All Rights Reserved
  13. */
  14.  
  15. #ifndef EXEC_TYPES_H
  16. #include <exec/types.h>
  17. #endif
  18.  
  19. #ifndef DEVICES_TIMER_H
  20. #include <devices/timer.h>
  21. #endif
  22.  
  23. /* ======================================================================== */
  24. /* === Preferences ======================================================== */
  25. /* ======================================================================== */
  26.  
  27. /* these are the definitions for the printer configurations */
  28. #define    FILENAME_SIZE    30            /* Filename size */
  29.  
  30. #define    POINTERSIZE (1 + 16 + 1) * 2    /* Size of Pointer data buffer */
  31.  
  32. /* These defines are for the default font size.  These actually describe the
  33.  * height of the defaults fonts.  The default font type is the topaz
  34.  * font, which is a fixed width font that can be used in either
  35.  * eighty-column or sixty-column mode.    The Preferences structure reflects
  36.  * which is currently selected by the value found in the variable FontSize,
  37.  * which may have either of the values defined below.  These values actually
  38.  * are used to select the height of the default font.  By changing the
  39.  * height, the resolution of the font changes as well.
  40.  */
  41. #define TOPAZ_EIGHTY 8
  42. #define TOPAZ_SIXTY 9
  43.  
  44. struct Preferences
  45. {
  46.     /* the default font height */
  47.     BYTE FontHeight;            /* height for system default font  */
  48.  
  49.     /* constant describing what's hooked up to the port */
  50.     UBYTE PrinterPort;            /* printer port connection       */
  51.  
  52.     /* the baud rate of the port */
  53.     UWORD BaudRate;            /* baud rate for the serial port   */
  54.  
  55.     /* various timing rates */
  56.     struct timeval KeyRptSpeed;        /* repeat speed for keyboard       */
  57.     struct timeval KeyRptDelay;        /* Delay before keys repeat       */
  58.     struct timeval DoubleClick;        /* Interval allowed between clicks */
  59.  
  60.     /* Intuition Pointer data */
  61.     UWORD PointerMatrix[POINTERSIZE];    /* Definition of pointer sprite    */
  62.     BYTE XOffset;            /* X-Offset for active 'bit'       */
  63.     BYTE YOffset;            /* Y-Offset for active 'bit'       */
  64.     UWORD color17;            /***********************************/
  65.     UWORD color18;            /* Colours for sprite pointer       */
  66.     UWORD color19;            /***********************************/
  67.     UWORD PointerTicks;            /* Sensitivity of the pointer       */
  68.  
  69.     /* Workbench Screen colors */
  70.     UWORD color0;            /***********************************/
  71.     UWORD color1;            /*  Standard default colours       */
  72.     UWORD color2;            /*   Used in the Workbench       */
  73.     UWORD color3;            /***********************************/
  74.  
  75.     /* positioning data for the Intuition View */
  76.     BYTE ViewXOffset;            /* Offset for top lefthand corner  */
  77.     BYTE ViewYOffset;            /* X and Y dimensions           */
  78.     WORD ViewInitX, ViewInitY;        /* View initial offset values       */
  79.  
  80.     BOOL EnableCLI;            /* CLI availability switch */
  81.  
  82.     /* printer configurations */
  83.     UWORD PrinterType;            /* printer type           */
  84.     UBYTE PrinterFilename[FILENAME_SIZE];/* file for printer       */
  85.  
  86.     /* print format and quality configurations */
  87.     UWORD PrintPitch;            /* print pitch               */
  88.     UWORD PrintQuality;            /* print quality           */
  89.     UWORD PrintSpacing;            /* number of lines per inch       */
  90.     UWORD PrintLeftMargin;        /* left margin in characters       */
  91.     UWORD PrintRightMargin;        /* right margin in characters       */
  92.     UWORD PrintImage;            /* positive or negative           */
  93.     UWORD PrintAspect;            /* horizontal or vertical       */
  94.     UWORD PrintShade;            /* b&w, half-tone, or color       */
  95.     WORD PrintThreshold;        /* darkness ctrl for b/w dumps       */
  96.  
  97.     /* print paper descriptors */
  98.     UWORD PaperSize;            /* paper size               */
  99.     UWORD PaperLength;            /* paper length in number of lines */
  100.     UWORD PaperType;            /* continuous or single sheet       */
  101.  
  102.     /* Serial device settings: These are six nibble-fields in three bytes */
  103.     /* (these look a little strange so the defaults will map out to zero) */
  104.     UBYTE   SerRWBits;     /* upper nibble = (8-number of read bits)    */
  105.              /* lower nibble = (8-number of write bits)    */
  106.     UBYTE   SerStopBuf;  /* upper nibble = (number of stop bits - 1)    */
  107.              /* lower nibble = (table value for BufSize)    */
  108.     UBYTE   SerParShk;     /* upper nibble = (value for Parity setting)    */
  109.              /* lower nibble = (value for Handshake mode)    */
  110.     UBYTE   LaceWB;     /* if workbench is to be interlaced        */
  111.  
  112.     UBYTE   WorkName[FILENAME_SIZE];  /* temp file for printer        */
  113.  
  114.     BYTE    RowSizeChange;    /* affect NormalDisplayRows/Columns    */
  115.     BYTE    ColumnSizeChange;
  116.  
  117.     UWORD    PrintFlags;    /* user preference flags */
  118.     UWORD    PrintMaxWidth;    /* max width of printed picture in 10ths/in */
  119.     UWORD    PrintMaxHeight;    /* max height of printed picture in 10ths/in */
  120.     UBYTE    PrintDensity;    /* print density */
  121.     UBYTE    PrintXOffset;    /* offset of printed picture in 10ths/inch */
  122.  
  123.     UWORD    wb_Width;        /* override default workbench width  */
  124.     UWORD    wb_Height;        /* override default workbench height */
  125.     UBYTE    wb_Depth;        /* override default workbench depth  */
  126.  
  127.     UBYTE    ext_size;        /* extension information -- do not touch! */
  128.                 /* extension size in blocks of 64 bytes */
  129. };
  130.  
  131.  
  132. /* Workbench Interlace (use one bit) */
  133. #define LACEWB            (1<< 0)
  134. #define LW_RESERVED    1        /* internal use only */
  135.  
  136. /* Enable_CLI    */
  137. #define SCREEN_DRAG    (1<<14)
  138. #define MOUSE_ACCEL    (1<<15)
  139.  
  140. /* PrinterPort */
  141. #define PARALLEL_PRINTER 0x00
  142. #define SERIAL_PRINTER    0x01
  143.  
  144. /* BaudRate */
  145. #define BAUD_110    0x00
  146. #define BAUD_300    0x01
  147. #define BAUD_1200    0x02
  148. #define BAUD_2400    0x03
  149. #define BAUD_4800    0x04
  150. #define BAUD_9600    0x05
  151. #define BAUD_19200    0x06
  152. #define BAUD_MIDI    0x07
  153.  
  154. /* PaperType */
  155. #define FANFOLD    0x00
  156. #define SINGLE        0x80
  157.  
  158. /* PrintPitch */
  159. #define PICA        0x000
  160. #define ELITE        0x400
  161. #define FINE        0x800
  162.  
  163. /* PrintQuality */
  164. #define DRAFT        0x000
  165. #define LETTER        0x100
  166.  
  167. /* PrintSpacing */
  168. #define SIX_LPI        0x000
  169. #define EIGHT_LPI    0x200
  170.  
  171. /* Print Image */
  172. #define IMAGE_POSITIVE    0x00
  173. #define IMAGE_NEGATIVE    0x01
  174.  
  175. /* PrintAspect */
  176. #define ASPECT_HORIZ    0x00
  177. #define ASPECT_VERT    0x01
  178.  
  179. /* PrintShade */
  180. #define SHADE_BW    0x00
  181. #define SHADE_GREYSCALE    0x01
  182. #define SHADE_COLOR    0x02
  183.  
  184. /* PaperSize */
  185. #define US_LETTER    0x00
  186. #define US_LEGAL    0x10
  187. #define N_TRACTOR    0x20
  188. #define W_TRACTOR    0x30
  189. #define CUSTOM        0x40
  190.  
  191. /* PrinterType */
  192. #define CUSTOM_NAME        0x00
  193. #define    ALPHA_P_101        0x01
  194. #define BROTHER_15XL        0x02
  195. #define CBM_MPS1000        0x03
  196. #define DIAB_630        0x04
  197. #define DIAB_ADV_D25        0x05
  198. #define DIAB_C_150        0x06
  199. #define EPSON            0x07
  200. #define EPSON_JX_80        0x08
  201. #define OKIMATE_20        0x09
  202. #define QUME_LP_20        0x0A
  203. /* new printer entries, 3 October 1985 */
  204. #define HP_LASERJET        0x0B
  205. #define HP_LASERJET_PLUS    0x0C
  206.  
  207. /* Serial Input Buffer Sizes */
  208. #define SBUF_512    0x00
  209. #define SBUF_1024    0x01
  210. #define SBUF_2048    0x02
  211. #define SBUF_4096    0x03
  212. #define SBUF_8000    0x04
  213. #define SBUF_16000    0x05
  214.  
  215. /* Serial Bit Masks */
  216. #define    SREAD_BITS    0xF0 /* for SerRWBits    */
  217. #define    SWRITE_BITS    0x0F
  218.  
  219. #define    SSTOP_BITS    0xF0 /* for SerStopBuf    */
  220. #define    SBUFSIZE_BITS    0x0F
  221.  
  222. #define    SPARITY_BITS    0xF0 /* for SerParShk    */
  223. #define SHSHAKE_BITS    0x0F
  224.  
  225. /* Serial Parity (upper nibble, after being shifted by
  226.  * macro SPARNUM() )
  227.  */
  228. #define SPARITY_NONE     0
  229. #define SPARITY_EVEN     1
  230. #define SPARITY_ODD     2
  231.  
  232. /* Serial Handshake Mode (lower nibble, after masking using
  233.  * macro SHANKNUM() )
  234.  */
  235. #define SHSHAKE_XON     0
  236. #define SHSHAKE_RTS     1
  237. #define SHSHAKE_NONE     2
  238.  
  239. /* new defines for PrintFlags */
  240.  
  241. #define CORRECT_RED        0x0001  /* color correct red shades */
  242. #define CORRECT_GREEN        0x0002  /* color correct green shades */
  243. #define CORRECT_BLUE        0x0004  /* color correct blue shades */
  244.  
  245. #define CENTER_IMAGE        0x0008  /* center image on paper */
  246.  
  247. #define IGNORE_DIMENSIONS   0x0000 /* ignore max width/height settings */
  248. #define BOUNDED_DIMENSIONS  0x0010  /* use max width/height as boundaries */
  249. #define ABSOLUTE_DIMENSIONS 0x0020  /* use max width/height as absolutes */
  250. #define PIXEL_DIMENSIONS    0x0040  /* use max width/height as prt pixels */
  251. #define MULTIPLY_DIMENSIONS 0x0080 /* use max width/height as multipliers */
  252.  
  253. #define INTEGER_SCALING     0x0100  /* force integer scaling */
  254.  
  255. #define ORDERED_DITHERING   0x0000 /* ordered dithering */
  256. #define HALFTONE_DITHERING  0x0200  /* halftone dithering */
  257. #define FLOYD_DITHERING     0x0400 /* Floyd-Steinberg dithering */
  258.  
  259. #define ANTI_ALIAS        0x0800 /* anti-alias image */
  260. #define GREY_SCALE2        0x1000 /* for use with hi-res monitor */
  261.  
  262. /* masks used for checking bits */
  263.  
  264. #define CORRECT_RGB_MASK    (CORRECT_RED|CORRECT_GREEN|CORRECT_BLUE)
  265. #define DIMENSIONS_MASK     (BOUNDED_DIMENSIONS|ABSOLUTE_DIMENSIONS|PIXEL_DIMENSIONS|MULTIPLY_DIMENSIONS)
  266. #define DITHERING_MASK        (HALFTONE_DITHERING|FLOYD_DITHERING)
  267.  
  268. #endif
  269.